home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / VBSamples / DirectShow / Editing / DexterVB / frmTrack.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-10-08  |  13.4 KB  |  346 lines

  1. VERSION 5.00
  2. Begin VB.Form frmTrack 
  3.    Caption         =   "Track Menu"
  4.    ClientHeight    =   3270
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   5805
  8.    Icon            =   "frmTrack.frx":0000
  9.    LinkTopic       =   "Form2"
  10.    LockControls    =   -1  'True
  11.    ScaleHeight     =   3270
  12.    ScaleWidth      =   5805
  13.    StartUpPosition =   1  'CenterOwner
  14.    Begin VB.Frame fraFixture 
  15.       Height          =   2715
  16.       Left            =   75
  17.       TabIndex        =   7
  18.       Top             =   0
  19.       Width           =   5640
  20.       Begin VB.TextBox txtPriority 
  21.          BeginProperty DataFormat 
  22.             Type            =   1
  23.             Format          =   "0"
  24.             HaveTrueFalseNull=   0
  25.             FirstDayOfWeek  =   0
  26.             FirstWeekOfYear =   0
  27.             LCID            =   1033
  28.             SubFormatType   =   1
  29.          EndProperty
  30.          Height          =   375
  31.          Left            =   1470
  32.          TabIndex        =   0
  33.          Top             =   225
  34.          Width           =   3975
  35.       End
  36.       Begin VB.TextBox txtBlank 
  37.          BeginProperty DataFormat 
  38.             Type            =   5
  39.             Format          =   "0"
  40.             HaveTrueFalseNull=   1
  41.             TrueValue       =   "1"
  42.             FalseValue      =   "0"
  43.             NullValue       =   ""
  44.             FirstDayOfWeek  =   0
  45.             FirstWeekOfYear =   0
  46.             LCID            =   1033
  47.             SubFormatType   =   7
  48.          EndProperty
  49.          Height          =   375
  50.          Left            =   1470
  51.          TabIndex        =   1
  52.          Top             =   705
  53.          Width           =   3975
  54.       End
  55.       Begin VB.TextBox txtMuted 
  56.          BeginProperty DataFormat 
  57.             Type            =   5
  58.             Format          =   "0"
  59.             HaveTrueFalseNull=   1
  60.             TrueValue       =   "1"
  61.             FalseValue      =   "0"
  62.             NullValue       =   ""
  63.             FirstDayOfWeek  =   0
  64.             FirstWeekOfYear =   0
  65.             LCID            =   1033
  66.             SubFormatType   =   7
  67.          EndProperty
  68.          Height          =   375
  69.          Left            =   1470
  70.          TabIndex        =   2
  71.          Top             =   1185
  72.          Width           =   3975
  73.       End
  74.       Begin VB.TextBox txtStartTime 
  75.          BeginProperty DataFormat 
  76.             Type            =   1
  77.             Format          =   "0"
  78.             HaveTrueFalseNull=   0
  79.             FirstDayOfWeek  =   0
  80.             FirstWeekOfYear =   0
  81.             LCID            =   1033
  82.             SubFormatType   =   1
  83.          EndProperty
  84.          Height          =   375
  85.          Left            =   1470
  86.          TabIndex        =   3
  87.          Top             =   1665
  88.          Width           =   3975
  89.       End
  90.       Begin VB.TextBox txtStopTime 
  91.          BeginProperty DataFormat 
  92.             Type            =   1
  93.             Format          =   "0"
  94.             HaveTrueFalseNull=   0
  95.             FirstDayOfWeek  =   0
  96.             FirstWeekOfYear =   0
  97.             LCID            =   1033
  98.             SubFormatType   =   1
  99.          EndProperty
  100.          Height          =   375
  101.          Left            =   1470
  102.          TabIndex        =   4
  103.          Top             =   2145
  104.          Width           =   3975
  105.       End
  106.       Begin VB.Label lblPriority 
  107.          Caption         =   "Priority"
  108.          Height          =   255
  109.          Left            =   150
  110.          TabIndex        =   12
  111.          Top             =   345
  112.          Width           =   1095
  113.       End
  114.       Begin VB.Label lblBlank 
  115.          Caption         =   "Blank"
  116.          Height          =   255
  117.          Left            =   150
  118.          TabIndex        =   11
  119.          Top             =   825
  120.          Width           =   1095
  121.       End
  122.       Begin VB.Label lblMuted 
  123.          Caption         =   "Muted"
  124.          Height          =   255
  125.          Left            =   150
  126.          TabIndex        =   10
  127.          Top             =   1305
  128.          Width           =   615
  129.       End
  130.       Begin VB.Label lblStart 
  131.          Caption         =   "Start"
  132.          Height          =   255
  133.          Left            =   150
  134.          TabIndex        =   9
  135.          Top             =   1785
  136.          Width           =   1215
  137.       End
  138.       Begin VB.Label lblStop 
  139.          Caption         =   "Stop"
  140.          Height          =   255
  141.          Left            =   150
  142.          TabIndex        =   8
  143.          Top             =   2265
  144.          Width           =   1215
  145.       End
  146.    End
  147.    Begin VB.CommandButton cmdOk 
  148.       Caption         =   "OK"
  149.       Default         =   -1  'True
  150.       Height          =   340
  151.       Left            =   3300
  152.       TabIndex        =   5
  153.       Top             =   2850
  154.       Width           =   1095
  155.    End
  156.    Begin VB.CommandButton cmdCancel 
  157.       Caption         =   "Cancel"
  158.       Height          =   340
  159.       Left            =   4500
  160.       TabIndex        =   6
  161.       Top             =   2850
  162.       Width           =   1215
  163.    End
  164. Attribute VB_Name = "frmTrack"
  165. Attribute VB_GlobalNameSpace = False
  166. Attribute VB_Creatable = False
  167. Attribute VB_PredeclaredId = True
  168. Attribute VB_Exposed = False
  169. '*******************************************************************************
  170. '*       This is a part of the Microsoft DXSDK Code Samples.
  171. '*       Copyright (C) 1999-2001 Microsoft Corporation.
  172. '*       All rights reserved.
  173. '*       This source code is only intended as a supplement to
  174. '*       Microsoft Development Tools and/or SDK documentation.
  175. '*       See these sources for detailed information regarding the
  176. '*       Microsoft samples programs.
  177. '*******************************************************************************
  178. Option Explicit
  179. Option Base 0
  180. Option Compare Text
  181. Private m_intUnloadMode As Integer
  182. Private Const DIALOG_TITLE = "Track Help"
  183. ' **************************************************************************************************************************************
  184. ' * PUBLIC INTERFACE- PROPERTIES
  185.             ' ******************************************************************************************************************************
  186.             ' * procedure name: UnloadMode
  187.             ' * procedure description:  Returns an integer specifying the method from which this dialog was last unloaded
  188.             ' *
  189.             ' ******************************************************************************************************************************
  190.             Public Property Get UnloadMode() As Integer
  191.             On Local Error GoTo ErrLine
  192.             'return the value to the client
  193.             UnloadMode = m_intUnloadMode
  194.             Exit Property
  195.             
  196. ErrLine:
  197.             Err.Clear
  198.             Exit Property
  199.             End Property
  200.             
  201.             
  202. ' **************************************************************************************************************************************
  203. ' * PRIVATE INTERFACE- FORM EVENT HANDLERS
  204.             ' ******************************************************************************************************************************
  205.             ' * procedure name: Form_Load
  206.             ' * procedure description:  Occurs when a form is loaded.
  207.             ' *
  208.             ' ******************************************************************************************************************************
  209.             Private Sub Form_Load()
  210.             On Local Error GoTo ErrLine
  211.             'set default value(s)
  212.             With Me
  213.                 .txtPriority.Text = vbNullString
  214.                 .txtBlank.Text = vbNullString
  215.                 .txtMuted.Text = vbNullString
  216.                 .txtStartTime.Text = vbNullString
  217.                 .txtStopTime.Text = vbNullString
  218.             End With
  219.             Exit Sub
  220.             
  221. ErrLine:
  222.             Err.Clear
  223.             Exit Sub
  224.             End Sub
  225.             
  226.             
  227.             ' ******************************************************************************************************************************
  228.             ' * procedure name: Form_QueryUnload
  229.             ' * procedure description:  Occurs before a form or application closes.
  230.             ' *
  231.             ' ******************************************************************************************************************************
  232.             Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  233.             On Local Error GoTo ErrLine
  234.             
  235.             Select Case UnloadMode
  236.                 Case vbFormControlMenu
  237.                          '0 The user chose the Close command from the Control menu on the form.
  238.                          Cancel = 1: Me.Visible = False
  239.                 Case vbFormCode
  240.                          '1 The Unload statement is invoked from code.
  241.                 Case vbAppWindows
  242.                          '2 The current Microsoft Windows operating environment session is ending.
  243.                 Case vbAppTaskManager
  244.                          '3 The Microsoft Windows Task Manager is closing the application.
  245.                          End
  246.                 Case vbFormMDIForm
  247.                          '4 An MDI child form is closing because the MDI form is closing.
  248.                 Case vbFormOwner
  249.                          '5 A form is closing because its owner is closing
  250.             End Select
  251.             Exit Sub
  252.             
  253. ErrLine:
  254.             Err.Clear
  255.             Exit Sub
  256.             End Sub
  257.             
  258.             
  259.             ' ******************************************************************************************************************************
  260.             ' * procedure name: Form_Unload
  261.             ' * procedure description:  Occurs when a form is about to be removed from the screen.
  262.             ' *
  263.             ' ******************************************************************************************************************************
  264.             Private Sub Form_Unload(Cancel As Integer)
  265.             On Local Error GoTo ErrLine
  266.             With Me
  267.                .Move 0 - (Screen.Width * 8), 0 - (Screen.Height * 8): .Visible = False
  268.             End With
  269.             Exit Sub
  270.             
  271. ErrLine:
  272.             Err.Clear
  273.             Exit Sub
  274.             End Sub
  275.             
  276.             
  277. ' **************************************************************************************************************************************
  278. ' * PRIVATE INTERFACE- CONTROL EVENT HANDLERS
  279.             ' ******************************************************************************************************************************
  280.             ' * procedure name: cmdOk_Click
  281.             ' * procedure description:  occures when the 'Ok' command button is pressed
  282.             ' *
  283.             ' ******************************************************************************************************************************
  284.             Private Sub cmdOk_Click()
  285.             Dim nResultant As VbMsgBoxResult
  286.             On Local Error GoTo ErrLine
  287.             
  288.             'validation code
  289.             If frmTrack.txtPriority.Text = vbNullString Then
  290.                 nResultant = MsgBox("You Must Set Priority", , DIALOG_TITLE)
  291.                 frmTrack.txtPriority.SetFocus
  292.                 Exit Sub
  293.             End If
  294.             If frmTrack.txtBlank.Text = vbNullString Then
  295.                 nResultant = MsgBox("You Must Set Blank", , DIALOG_TITLE)
  296.                 frmTrack.txtBlank.SetFocus
  297.                 Exit Sub
  298.             End If
  299.             If frmTrack.txtMuted.Text = vbNullString Then
  300.                 nResultant = MsgBox("You Must Set Muted", , DIALOG_TITLE)
  301.                 frmTrack.txtMuted.SetFocus
  302.                 Exit Sub
  303.             End If
  304.             If frmTrack.txtStartTime.Text = vbNullString Then
  305.                 nResultant = MsgBox("You Must Set Start", , DIALOG_TITLE)
  306.                 frmTrack.txtStartTime.SetFocus
  307.                 Exit Sub
  308.             End If
  309.             If frmTrack.txtStopTime.Text = vbNullString Then
  310.                 nResultant = MsgBox("You Must Set Stop", , DIALOG_TITLE)
  311.                 frmTrack.txtStopTime.SetFocus
  312.                 Exit Sub
  313.             End If
  314.             If CLng(frmTrack.txtStartTime.Text) > CLng(frmTrack.txtStopTime.Text) Then
  315.                 nResultant = MsgBox("Start Must Be Lower Than Stop", , DIALOG_TITLE)
  316.                 frmTrack.txtStartTime.SetFocus
  317.             End If
  318.             
  319.             'hide the dialog
  320.             Me.Visible = False
  321.             Exit Sub
  322.             
  323. ErrLine:
  324.             Err.Clear
  325.             Exit Sub
  326.             End Sub
  327.             
  328.             
  329.             ' ******************************************************************************************************************************
  330.             ' * procedure name: cmdCancel_Click
  331.             ' * procedure description:  occures when the user presses the "Cancel" button
  332.             ' *
  333.             ' ******************************************************************************************************************************
  334.             Private Sub cmdCancel_Click()
  335.             On Local Error GoTo ErrLine
  336.             'hide the dialog
  337.             Me.Visible = False
  338.             m_intUnloadMode = 1
  339.             Exit Sub
  340.             
  341. ErrLine:
  342.             
  343.             Err.Clear
  344.             Exit Sub
  345.             End Sub
  346.